<?php
namespace App\Model\Api;

use App\Model\BaseModel;

class RsSweetTitle extends BaseModel {

    protected $connection = 'api';
    protected $table = "rs_sweet_title";
    protected $fields = ['id', 'group', 'title'];
    protected $tablePrefix = '';

    public function __construct()
    {
        $this->tablePrefix = env('DB_PREFIX_API');
    }

    public function getTitles (){
//        $condition = array(
//            "is_deleted"=>0
//        );
        $return = $this->getListByCondition([], $this->fields);
        $return = array_column($return, null, 'id');
        return $return;
    }
}

